package com.minimalist.lindi.service;

import com.minimalist.common.config.mybatis.bo.PageResp;
import com.minimalist.common.entity.lindi.po.LindiTradeApplicationTemplateConfirmLetter;
import com.minimalist.common.entity.lindi.vo.contracttemplate.LindiContractTemplateVO;
import com.minimalist.common.entity.lindi.vo.tradeapplicationtemplateconfirmletter.LindiTradeApplicationTemplateConfirmLetterQueryVO;
import com.minimalist.common.entity.lindi.vo.tradeapplicationtemplateconfirmletter.LindiTradeApplicationTemplateConfirmLetterVO;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 林地指标交易平台_交易申请确认函模板文件 服务层。
 *
 * @author 11987
 * @since 2025-06-06
 */
public interface LindiTradeApplicationTemplateConfirmLetterService extends IService<LindiTradeApplicationTemplateConfirmLetter>{

    /**
     * 添加交易申请确认函模板
     *
     * @param tradeApplicationTemplateConfirmLetterVO 交易申请确认函模板VO
     */
    void addTradeApplicationTemplateConfirmLetter(LindiTradeApplicationTemplateConfirmLetterVO tradeApplicationTemplateConfirmLetterVO);

    /**
     * 根据ID删除交易申请确认函模板
     *
     * @param tradeApplicationTemplateConfirmLetterId 交易申请确认函模板ID
     */
    void deleteTradeApplicationTemplateConfirmLetterByTradeApplicationTemplateConfirmLetterId(Long tradeApplicationTemplateConfirmLetterId);

    /**
     * 根据ID更新交易申请确认函模板
     *
     * @param tradeApplicationTemplateConfirmLetterVO 交易申请确认函模板VO
     */
    void updateTradeApplicationTemplateConfirmLetterByTradeApplicationTemplateConfirmLetterId(
            LindiTradeApplicationTemplateConfirmLetterVO tradeApplicationTemplateConfirmLetterVO);

    /**
     * 分页查询交易申请确认函模板列表
     *
     * @param queryVO 查询条件
     * @return 分页结果
     */
    PageResp<LindiTradeApplicationTemplateConfirmLetterVO> getPageTradeApplicationTemplateConfirmLetterList(
            LindiTradeApplicationTemplateConfirmLetterQueryVO queryVO);

    /**
     * 根据ID查询交易申请确认函模板
     *
     * @param tradeApplicationTemplateConfirmLetterId 交易申请确认函模板ID
     * @return 交易申请确认函模板VO
     */
    LindiTradeApplicationTemplateConfirmLetterVO getTradeApplicationTemplateConfirmLetterByTradeApplicationTemplateConfirmLetterId(
            Long tradeApplicationTemplateConfirmLetterId);

    /**
     * 根据文件ID删除交易申请确认函模板文件
     *
     * @param fileId 文件ID
     */
    void deleteTradeApplicationTemplateConfirmLetterFileByFileId(Long fileId);

    /**
     * 生成交易申请确认函模板
     *
     * @param tradeApplicationId      交易申请ID
     * @param confirmLetterTemplateId 确认函模板ID
     * @param confirmLetterType       确认函类型
     * @param createId                创建人ID
     * @param tenantId                租户ID
     * @return 文件VO
     */
    LindiTradeApplicationTemplateConfirmLetterVO generateTemplateConfirmLetter(Long tradeApplicationId, Long confirmLetterTemplateId
            , String confirmLetterType, Long createId, Long tenantId);

    /**
     * 获取合同模板列表
     *
     * @return 合同模板列表
     */
    List<LindiContractTemplateVO> getContractTemplateList();
}
